<h1><span class="reg_ico"></span><?= lang('label_shiping_details'); ?></h1>

<ul class="breadcrumb">
    <li><a href="<?= base_url() ?>"><?= lang('label_home') ?></a></li>
    <li><a href="<?= base_url("store") ?>"><?= lang('label_menu_link_mystore') ?></a></li>
    <li><a href="<?= base_url("store/deals") ?>"><?= lang('label_deals') ?></a></li>
    <li><a href="<?= base_url("store/showdeal/$details->id/$details->inv_num") ?>"><?= lang('label_deal_details') . ' (' . strtoupper($details->inv_num) . ')' ?></a></li>
    <li><?= lang('label_shiping_details') ?></li>
</ul>


<div class="page">
    <div class="invoice">
            <b>&raquo; <?= lang('label_invoices_id') ?> :</b>  <?= strtoupper($details->inv_num) ?>
            <br /><b>&raquo; <?= lang('label_product_name') ?> :</b>  <a href="<?= base_url('products/view/' . $details->product_id) ?>" target="_blank"><?= $details->title ?></a>
            <br /><b>&raquo; <?= lang('label_address') ?> :</b>  <?= $details->address ?>
            <br /><b>&raquo; <?= lang('label_menu_link_city') ?> :</b>  <?= get_city_name_id($details->city_id) ?>
            <br /><b>&raquo; <?= lang('label_mobile') ?> :</b>  <?= $details->mobile ?>
        </div>
    <form class="forms" enctype="multipart/form-data" action="<?php echo current_url() ?>" method="post">


        <div class="browse">
            <label for="image"><?= lang('label_shiping_bill_image') ?> :</label>
            <samp>
                <input type="file" id="image" name="image"  /><label for="image"></label>
            </samp>
        </div>

        <div class="text">
            <label for="tracknum"><?php echo lang('label_shiping_track_num') ?> :</label>
            <samp>
                <input type="text" name="tracknum" id="tracknum" placeholder="<?php echo lang('label_shiping_track_num') ?>" class="input-user" value="<?= form_val('tracknum') ?>" />
            </samp>
        </div>

        <div class="text">
            <label for="company"><?php echo lang('label_shiping_company') ?> :</label>
            <samp>
                <input type="text" name="company" id="company" placeholder="<?php echo lang('label_shiping_company') ?>" class="input-user" value="<?= form_val('company') ?>" />
            </samp>
        </div>

        <div class="text">
            <label for="companysite"><?php echo lang('label_shiping_company_site') ?> :</label>
            <samp>
                <input type="url" name="companysite" id="companysite" placeholder="<?php echo lang('label_shiping_company_site_holder') ?>" class="input-user" value="<?php echo form_val('companysite') ?>" />
            </samp>
        </div>

        <div class="select">
            <label><?php echo lang('label_shiping_sent_date') ?> :</label>
            <samp style="min-width: 46px">
                <select name="day" id="day" style="width: 46px">
                    <?php for ($i = 1; $i <= 31; $i++) { ?>
                        <option value="<?= $i ?>" <?php
                        if (form_val('day') == $i) {
                            echo 'selected';
                        } 
                        ?>><?= $i ?></option>
                            <?php } ?>
                </select>
            </samp> / 
            <samp style="min-width: 87px">
                <select name="month" id="month" style="width: 87px">
                    <?php for ($i = 1; $i <= 12; $i++) { ?>
                        <option value="<?= $i ?>" <?php
                        if (form_val('month') == $i) {
                            echo 'selected';
                        } 
                        ?>><?= lang('label_m' . $i) ?></option>
                            <?php } ?>
                </select>
            </samp> / 
            <samp style="min-width: 54px">
                <select name="year" id="year" style="width:54px">
                    <?php
                    for ($i = 0; $i < 15; $i++) {
                        $date = date('Y') - $i;
                        ?>
                        <option value="<?= $date ?>" <?php
                        if (form_val('year') == $date) {
                            echo 'selected';
                        } 
                        ?>><?= $date ?></option>
                            <?php } ?>
                </select>
            </samp> - 
            <samp style="min-width: 46px">
                <select name="hour" id="hour" style="width: 46px">
                    <?php for ($i = 1; $i <= 12; $i++) { 
                        if($i < 10)  $time = '0'.$i; else $time = $i;
                        ?>
                        <option value="<?= $time ?>" <?php
                        if (form_val('hour') == $time) {
                            echo 'selected';
                        } 
                        ?>><?= $time ?></option>
                            <?php } ?>
                </select>
            </samp> : 
            <samp style="min-width: 46px">
                <select name="minutes" id="minutes" style="width:46px">
                    <?php
                    for ($i = 0; $i < 60; $i++) {
                        if($i < 10)  $time = '0'.$i; else $time = $i;
                        ?>
                        <option value="<?= $time ?>" <?php
                        if (form_val('minutes') == $time) {
                            echo 'selected';
                        } 
                        ?>><?= $time ?></option>
                            <?php } ?>
                </select>
            </samp>
            <samp style="min-width: 46px">
                <select name="time" id="time" style="width:46px">
                    <option value="am" <?php
                        if (form_val('time') == 'am') {
                            echo 'selected';
                        } 
                        ?>><?= lang('label_am') ?></option>
                    <option value="pm" <?php
                        if (form_val('time') == 'pm') {
                            echo 'selected';
                        } 
                        ?>><?= lang('label_pm') ?></option>
                </select>
            </samp>
        </div>


        <div class="submit">
            <input name="submit" value="<?= lang('label_save') ?>" type="submit"  >
        </div>

    </form>
</div>